#ifndef MYBUTTON_H
#define MYBUTTON_H

#include "SDL/SDL.h"

class MyMenu;

/*! 
 *  \class MyButton
 *  \brief MyMenu button class 
 *  \author Peter Kosa
 *  \version 1.52
 *  \date    2006-2008
 */
class MyButton
{   
public:
    /*! creates new button with position box, id and pointer to parent */
    MyButton(SDL_Rect* box, int id, MyMenu* parent);		
	~MyButton();

    /*! sets new clip for the button */
    void	set_clip(SDL_Rect* _clip);	
    /*! handles incomming events - decided by clip */ 
    int		handle_events(SDL_Event*);	 
    /*! draw this button on his position on the screen */
    void	show();						
    /*! checks whether the [x,y] input is in the area of this button */
    int		in_me(int x, int y);		 
    /*! //returns the id of the button */
    int		get_id();	
    /*! position on screen */
    SDL_Rect *box;	
    /*! position in the sheet */
    SDL_Rect *clip;

private:    
	char id;
	MyMenu* parent;    
};

#endif
